package com.example.starapp.mefrag;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;

import com.example.starapp.R;

public class ProblemActivity extends AppCompatActivity implements View.OnClickListener {
private static final String TAG ="ProblemActivity" ;
        ImageView backIv;
        TextView titleTv;
        EditText jy;
        Button submitBtn;
        String jianyi;
@Override
protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_problem);
        backIv=findViewById(R.id.title_iv_back);
        titleTv=findViewById(R.id.title_tv);
        titleTv.setText("反馈建议");
        jy=findViewById(R.id.tv_yj);

        submitBtn=findViewById(R.id.btn_submit);
        backIv.setOnClickListener(this);
        submitBtn.setOnClickListener(this);

        }

@Override
public void onClick(View v) {
        switch (v.getId()) {
        case R.id.title_iv_back:
        finish();;
        break;
        case R.id.btn_submit:
        jianyi = jy.getText().toString();
        Log.d(TAG, "jianyi: "+jianyi);
        if (!TextUtils.isEmpty(jianyi)) {
        Toast.makeText(this, "已提交您的反馈", Toast.LENGTH_SHORT).show();
        }else {
        Toast.makeText(this, "您还未输入！", Toast.LENGTH_SHORT).show();
        }
        }
        }
        }